/*
Copyright (c) [2019年5月1日] [吴超]
[MBT_Studio] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
		 http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
*/
#pragma once

#include <基本类型.h>
#include <vector>

#include "程序结构/程序结构树.h"


/*
{
	{}, (), [], ->, ., 
}

{
	->, .,
}

{
	算术运算符		!, ~, 前++, 前--
}

{
	算术运算符		后++， 后--, (type)*, &, sizeof()
}

{
	算术运算符		×、÷
}

{
	算术运算符		+、-
}

{
	双目位运算符	<<, >>,
}

{
	关系运算符		<, <=, >, >=
}

{
	关系运算符		==, !=
}

{
	位运算符		&,
}

{
	位运算符		^,
}

{
	位运算符		|,
}

{
	逻辑运算符		&&,
}

{
	逻辑运算符		||,
}

{
	三目运算符		?:
}

{
	赋值运算符		=, +=, -=, *=, /=, %=, <<=, >>=, &= ^=, |= 
}

*/

class C_程序代码 {
	std::vector<std::wstring> m_Code;

public:
	C_程序代码();
	~C_程序代码();

	S_LLVM模块* m_llvm模块;
	C_程序树	m_程序树;

	void f_Load代码(const std::wstring& code);
	void f_close代码();

	void f_编译();

protected:
	void f_解析代码();
	
	std::vector<std::wstring> m_Err;
};

















